﻿<UserControl x:Class="UsingBxf.ErrorDisplay"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" xmlns:my="clr-namespace:UsingBxf.ViewModels">
  <UserControl.Resources>
    <CollectionViewSource x:Key="errorViewModelViewSource" d:DesignSource="{d:DesignInstance my:ErrorViewModel, CreateList=True}" />
  </UserControl.Resources>
  <Grid>
    <Grid.Background>
      <LinearGradientBrush EndPoint="1,0.5" StartPoint="0,0.5">
        <GradientStop Color="BlanchedAlmond" Offset="0" />
        <GradientStop Color="#5BFC0000" Offset="1" />
      </LinearGradientBrush>
    </Grid.Background>
    <StackPanel Orientation="Horizontal" DataContext="{StaticResource errorViewModelViewSource}" Margin="3">
      <TextBlock Width="150" Text="{Binding Path=Title}" Margin="3" TextTrimming="WordEllipsis" FontWeight="Bold" />
      <ScrollViewer VerticalScrollBarVisibility="Auto">
        <TextBlock MinWidth="150" Text="{Binding Path=Message}" Margin="3" TextWrapping="Wrap" FontWeight="Bold" />
      </ScrollViewer>
    </StackPanel>
  </Grid>
</UserControl>
